using System.Collections.Generic;
using System.Text.Json.Serialization;
using JlPay.Sdk.Models;

namespace JlPay.Sdk.Models.Merchant
{
    /// <summary>
    /// 商户进件修改请求
    /// </summary>
    public class MerchantIncomingModifyRequest : OrgBaseRequest
    {
        /// <summary>
        /// API接口路径
        /// </summary>
        public const string API_URL = "/open/merch/access/incoming/modify";

        /// <summary>
        /// 基础信息
        /// </summary>
        [JsonPropertyName("base_info")]
        public Dictionary<string, object>? BaseInfo { get; set; }

        /// <summary>
        /// 身份信息
        /// </summary>
        [JsonPropertyName("identification_info")]
        public Dictionary<string, object>? IdentificationInfo { get; set; }

        /// <summary>
        /// 经营信息
        /// </summary>
        [JsonPropertyName("business_info")]
        public Dictionary<string, object>? BusinessInfo { get; set; }

        /// <summary>
        /// 结算信息
        /// </summary>
        [JsonPropertyName("settlement_info")]
        public Dictionary<string, object>? SettlementInfo { get; set; }

        /// <summary>
        /// 结算规则
        /// </summary>
        [JsonPropertyName("settlement_rule")]
        public Dictionary<string, object>? SettlementRule { get; set; }

        /// <summary>
        /// 附加信息
        /// </summary>
        [JsonPropertyName("additional_info")]
        public Dictionary<string, object>? AdditionalInfo { get; set; }

        /// <summary>
        /// 短信配置
        /// </summary>
        [JsonPropertyName("sms_config")]
        public Dictionary<string, object>? SmsConfig { get; set; }

        /// <summary>
        /// 功能信息
        /// </summary>
        [JsonPropertyName("func_info")]
        public Dictionary<string, object>? FuncInfo { get; set; }

        /// <summary>
        /// 连锁店信息
        /// </summary>
        [JsonPropertyName("chain_store_info")]
        public Dictionary<string, object>? ChainStoreInfo { get; set; }

        /// <summary>
        /// 品牌信息
        /// </summary>
        [JsonPropertyName("brand_info")]
        public Dictionary<string, object>? BrandInfo { get; set; }

        /// <summary>
        /// 构造函数
        /// </summary>
        public MerchantIncomingModifyRequest()
        {
            // 添加敏感字段
            // 基础信息中的敏感字段
            AddSensitiveField("base_info.contact_info.contact_name");
            AddSensitiveField("base_info.contact_info.contact_phone");
            AddSensitiveField("base_info.contact_info.contact_id_no");
            
            // 身份信息中的敏感字段
            AddSensitiveField("identification_info.identity_info.id_card_name");
            AddSensitiveField("identification_info.identity_info.id_card_english_name");
            AddSensitiveField("identification_info.identity_info.id_card_no");
            AddSensitiveField("identification_info.identity_info.legal_person_phone");
            AddSensitiveField("identification_info.identity_info.id_card_address");
            
            // 结算信息中的敏感字段
            AddSensitiveField("settlement_info.account_info.account_no");
            AddSensitiveField("settlement_info.account_info.account_name");
            AddSensitiveField("settlement_info.account_info.bank_set_phone");
            AddSensitiveField("settlement_info.account_info.delegatee_name");
            AddSensitiveField("settlement_info.account_info.delegatee_id_card");
            AddSensitiveField("settlement_info.account_info.delegatee_phone");
            
            // 补充信息中的敏感字段
            AddSensitiveField("additional_info.specs_info.account_no");
            AddSensitiveField("additional_info.specs_info.account_name");
            
            // 品牌中的敏感字段
            AddSensitiveField("brand_info.contact_name");
            AddSensitiveField("brand_info.contact_phone");
        }
    }
} 